//嵌套语句
#include <stdio.h>

int main()
{
  int oilN,oilL;
  double price;
  printf("请输入要加的油号：");
  scanf("%d",&oilN);
  printf("请输入要加的油量：");
  scanf("%d",&oilL);
  switch(oilN){
    case 92:
    price=4;
    if(oilL>=40){
      price=3.5;
    }
    printf("你加了%d号汽油，加了%d升，总价为%.2lf元。\n",oilN,oilL,price*oilL);break;
    case 95:
    price=5;
    if(oilL>=40){
      price=4.5;
    }
    printf("你加了%d号汽油，加了%d升，总价为%.2lf元。\n",oilN,oilL,price*oilL);break;
    default:printf("输入错误！");
  }
  printf("程序错误！");
  return 0;
}